1 00:00:02,760 --> 00:00:07,890 OC So before we start creating our games and roadblocks, I just want to quickly show you how you can 2 00:00:07,890 --> 00:00:13,980 access the services and any objects in your workspace since services are going to be really important 3 00:00:13,980 --> 00:00:16,950 because you're going to use a lot of functions and properties in them. 4 00:00:16,950 --> 00:00:21,780 So I just want to show you quickly how to do that before we move on to the other lectures in the course. 5 00:00:22,350 --> 00:00:24,210 So there's this key word here in Roblox. 6 00:00:24,210 --> 00:00:25,110 It's called Game. 7 00:00:26,610 --> 00:00:30,240 And it holds all of the game services. 8 00:00:30,240 --> 00:00:33,080 It holds all the properties or holds everything in your game. 9 00:00:33,090 --> 00:00:36,570 It's like the big overarching table that holds everything in your game. 10 00:00:36,570 --> 00:00:42,660 It refers to everything and you can index it, of course, and you can get access to all the services. 11 00:00:42,660 --> 00:00:46,320 There's events in here, properties, all that good stuff. 12 00:00:48,770 --> 00:00:50,360 And you can just type in the name of it. 13 00:00:50,360 --> 00:00:54,320 So for example, if I wanted to get access to like the lighting service, I could just type lighting. 14 00:00:55,340 --> 00:00:56,580 But there is a small issue. 15 00:00:56,600 --> 00:01:00,530 Doing it this way is that if I ever changed the name of leading. 16 00:01:00,530 --> 00:01:08,870 So for example, if I change it to like l for some reason now the game when I type in lighting, it's 17 00:01:08,870 --> 00:01:10,590 not going to know what I'm referring to. 18 00:01:10,610 --> 00:01:14,060 So a better way to do it is that there's this function in this table. 19 00:01:14,060 --> 00:01:20,000 It's called get service and you can type in the class name instead of the name of the instance of the 20 00:01:20,000 --> 00:01:20,780 class. 21 00:01:21,020 --> 00:01:26,480 So I can do lighting and it will get the lighting the lighting service for me, no matter what its name 22 00:01:26,480 --> 00:01:26,720 is. 23 00:01:26,720 --> 00:01:30,020 This is just a better way of doing it using this get service function. 24 00:01:30,170 --> 00:01:37,820 So no matter what I name these services in my game, I will always be able to get them to get the workspace. 25 00:01:37,820 --> 00:01:44,000 You don't want to do get service workspace that's a little little involved, especially when there's 26 00:01:44,000 --> 00:01:44,930 an easier way to do it. 27 00:01:44,930 --> 00:01:50,180 There's a keyword that's just workspace, and I have access to everything in your workspace so I can 28 00:01:50,180 --> 00:01:55,700 access all the properties of the workspace and then I can access any of the children of the workspace. 29 00:01:55,700 --> 00:02:01,280 So for example, I can access the base plate by typing base plate, and then I can access all the properties 30 00:02:01,280 --> 00:02:05,660 of the base plate as well as any of the children of the base plate like this texture. 31 00:02:05,690 --> 00:02:10,610 So I can type texture, and then I have access to all the properties of the texture. 32 00:02:11,350 --> 00:02:16,600 So let's just quickly to show you how you can access stuff in your game by using the dot operator and 33 00:02:16,600 --> 00:02:19,840 using the get service function to grab any services in your game.